syn keyword amlFormedCmd contained button choice display help input slider text
" TABLES reserved words, defined as keywords.
syn keyword amlTabCmd contained add additem alter asciihelp aselect at calc calculate change commands commit copy define directory dropindex dropitem erase external get help indexitem items kill list move nselect purge quit redefine rename reselect rollback save select show sort statistics unload update usagecontained
" INFO reserved words, defined as keywords.
syn keyword amlInfoCmd contained accept add adir alter dialog alter alt directory aret arithmetic expressions aselect automatic return calculate cchr change options change comi cominput commands list como comoutput compile concatenate controlling defaults copy cursor data delete data entry data manipulate data retrieval data update date format datafile create datafile management decode define delimiter dfmt directory management directory display do doend documentation done end environment erase execute exiting expand export external fc files first format forms control get goto help import input form ipf internal item types items label lchar list logical expressions log merge modify options modify move next nselect output password prif print programming program protect purge query quit recase redefine relate relate release notes remark rename report options reporting report reselect reserved words restrictions run save security select set sleep sort special form spool stop items system variables take terminal types terminal time topics list type update upf
" VTRACE reserved words, defined as keywords.
syn keyword amlVtrCmd contained add al arcscan arrowlength arrowwidth as aw backtrack branch bt cj clearjunction commands cs dash endofline endofsession eol eos fan fg foreground gap generalizetolerance gtol help hole js junctionsensitivity linesymbol linevariation linewidth ls lv lw markersymbol mode ms raster regionofinterest reset restore retrace roi save searchradius skip sr sta status stc std str straightenangle straightencorner straightendistance straightenrange vt vtrace
" The AML reserved words, defined as keywords.
syn keyword amlFunction contained abs access acos after angrad asin atan before calc close copy cos cover coverage cvtdistance date delete dignum dir directory entryname exist[s] exp extract file filelist format formatdate full getchar getchoice getcover getdatabase getdeflayers getfile getgrid getimage getitem getlayercols getlibrary getstack getsymbol gettin getunique iacclose iacconnect iacdisconnect iacopen iacrequest index indexed info invangle invdistance iteminfo joinfile keyword length listfile listitem listunique locase log max menu min mod noecho null okangle okdistance open pathname prefix query quote quoteexists r radang random read rename response round scratchname search show sin sort sqrt subst substr suffix tan task token translate trim truncate type unquote upcase username value variable verify write
syn keyword amlDir contained abbreviations above all aml amlpath append arc args atool brief by call canvas cc center cl codepage commands conv_watch_to_aml coordinates cr create current cursor cwta dalines data date_format delete delvar describe dfmt digitizer display do doend dv echo else enable encode encrypt end error expansion fail file flushpoints force form format frame fullscreen function getlastpoint getpoint goto iacreturn if ignore info inform key keypad label lc left lf lg list listchar listfiles listglobal listheader listlocal listprogram listvar ll lp lr lv map matrix menu menupath menutype mess message[s] modal mouse nopaging off on others page pause pinaction popup position pt pulldown push pushpoint r repeat return right routine run runwatch rw screen seconds select self setchar severity show sidebar single size staggered station stop stripe sys system tablet tb terminal test then thread to top translate tty ty type uc ul until ur usage w warning watch when while window workspace
syn keyword amlDir2 contained delvar dv s set setvar sv
syn keyword amlOutput contained inform warning error pause stop tty ty type
" AML Directives:
syn match amlDirSym "&"
syn match amlDirective "&[a-zA-Z]*" contains=amlDir,amlDir2,amlDirSym
" AML Functions
syn region amlFunc start="\[ *[a-zA-Z]*" end="\]" contains=amlFunction,amlVar
syn match amlFunc2 "\[.*\[.*\].*\]" contains=amlFunction,amlVar
" Numbers:
"syn match amlNumber "-\=\<[0-9]*\.\=[0-9_]\>"
" Quoted Strings:
syn region amlQuote start=+"+ skip=+\\"+ end=+"+ contains=amlVar
syn region amlQuote start=+'+ skip=+\\'+ end=+'+
" ARC Application Commands only selected at the beginning of the line,
" or after a one line &if &then statement
syn match amlAppCmd "^ *[a-zA-Z]*" contains=amlArcCmd,amlInfoCmd,amlTabCmd,amlVtrCmd,amlFormedCmd
syn region amlAppCmd start="&then" end="$" contains=amlArcCmd,amlFormedCmd,amlInfoCmd,amlTabCmd,amlVtrCmd,amlFunction,amlDirective,amlVar2,amlSkip,amlVar,amlComment
" Variables
syn region amlVar start="%" end="%"
syn region amlVar start="%" end="%" contained
syn match amlVar2 "&s [a-zA-Z_.0-9]*" contains=amlDir2,amlDirSym
syn match amlVar2 "&sv [a-zA-Z_.0-9]*" contains=amlDir2,amlDirSym
syn match amlVar2 "&set [a-zA-Z_.0-9]*" contains=amlDir2,amlDirSym
syn match amlVar2 "&setvar [a-zA-Z_.0-9]*" contains=amlDir2,amlDirSym
syn match amlVar2 "&dv [a-zA-Z_.0-9]*" contains=amlDir2,amlDirSym
syn match amlVar2 "&delvar [a-zA-Z_.0-9]*" contains=amlDir2,amlDirSym
" Formedit 2 word commands
syn match amlFormed "^ *check box"
syn match amlFormed "^ *data list"
syn match amlFormed "^ *symbol list"
" Tables 2 word commands
syn match amlTab "^ *q stop"
syn match amlTab "^ *quit stop"
" Comments:
syn match amlComment "/\*.*"
" Regions for skipping over (not highlighting) program output strings:
syn region amlSkip matchgroup=amlOutput start="&call" end="$" contains=amlVar
syn region amlSkip matchgroup=amlOutput start="&routine" end="$" contains=amlVar
syn region amlSkip matchgroup=amlOutput start="&inform" end="$" contains=amlVar
syn region amlSkip matchgroup=amlOutput start="&return &inform" end="$" contains=amlVar
syn region amlSkip matchgroup=amlOutput start="&return &warning" end="$" contains=amlVar
syn region amlSkip matchgroup=amlOutput start="&return &error" end="$" contains=amlVar
syn region amlSkip matchgroup=amlOutput start="&pause" end="$" contains=amlVar
syn region amlSkip matchgroup=amlOutput start="&stop" end="$" contains=amlVar
syn region amlSkip matchgroup=amlOutput start="&tty" end="$" contains=amlVar
syn region amlSkip matchgroup=amlOutput start="&ty" end="$" contains=amlVar
syn region amlSkip matchgroup=amlOutput start="&typ" end="$" contains=amlVar
syn region amlSkip matchgroup=amlOutput start="&type" end="$" contains=amlVar
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_aml_syntax_inits")